import request from "../utils/request";

//预约科室,登录，查询部门
export function queryDepartments(val) {
	return request({
		url: '/med-front-appointment/appointment/queryDepartment',
		method: 'get',
		params: val
	})
}

// 确保你正确导出了 queryDoctor 函数
export function queryDoctor(val) {
	return request({
		url: '/med-front-appointment/appointment/selectDoctor',
		method: 'get',
		params: val
	});
}

//更据医生id查找预约订单
export function queryAppointment(val) {
	return request({
		url: '/med-front-appointment/appointment/selectAppointment',
		method: 'get',
		params: val
	});
}

// 创建预约（输入预约id和用户id）
export function createAppointment(val) {
	return request({
		url: '/med-front-appointment/appointment/create',
		method: 'post', // 修改为POST方法
		data: val // 使用data传递参数（POST请求规范）
	});
}

// 创建支付页面
export function createPay(val) {
	return request({
		url: '/med-front-appointment/alipay/payBalance',
		method: 'post', // 修改为POST方法
		data: val // 使用data传递参数（POST请求规范）
	});
}